<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/3
 * Time: 13:53
 */

namespace App;


use Illuminate\Database\Eloquent\Model;

class Article extends Model
{
    protected $table = 'articles';
    public $timestamps = false;

    protected $fillable = [
        'article_picture', 'subject', 'content', 'create_time', 'view_number', 'sort_order', 'cate_id', 'sec_subject'
    ];

    public function articleCate()
    {
        return $this->belongsTo('App\ArticleCate', 'cate_id', 'id');
    }

    public function articleCateGet()
    {
        return $this->articleCate()->get();
    }
}